package service

import (
	"context"
	"errors"

	__ "shop-microservices/basic/goods_proto"
	"shop-microservices/handler/dao"
)

func (s *Server) HotSearchList(_ context.Context, in *__.HotSearchListReq) (*__.HotSearchListResp, error) {
	list, err := dao.BrandHotList(in)
	if err != nil {
		return nil, errors.New("查询失败")
	}
	return &__.HotSearchListResp{
		List: list,
	}, nil
}
func (s *Server) HotSearchGoods(_ context.Context, in *__.HotSearchGoodsReq) (*__.HotSearchGoodsResp, error) {
	list, err := dao.HotSearchGoodsList(in)
	if err != nil {
		return nil, errors.New("查询失败")
	}
	return &__.HotSearchGoodsResp{
		List: list,
	}, nil
}
